package com.yuntu.controller;

import com.yuntu.service.department.DepartmentService;
import com.yuntu.util.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @author Dandan
 * @创建日期 2022/11/1 16:29
 * @文件描述
 */
@Controller
@RequestMapping("dep")
public class DepartmentController {
    @Autowired
    DepartmentService departmentService;

    @RequestMapping("getAll")
    @ResponseBody
    public Result getAll(){
        return new Result(departmentService.list(),200,"");
    }
}
